package com.gaogzhen.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
@Api(tags = "用户信息")
public class UserInfoController {

    @GetMapping("/user/info")
    @ApiOperation(value = "user/info", notes = "获取当前登录用户对象")
    public Principal principal(Principal principal) {
        return principal;
    }
}
